import assessCheckApi from './api'
import { axios } from '@/utils/request'
import router from '@/router/index'
import blobType from '@/common/blobType'
var menuType = blobType.menuType
var fywflcodeArr = blobType.fywflcodeArr
var fywflcode = ''
//根据Id查询
export function queryJobByJobIdServe(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.queryJobByJobId,
      method:'get' ,
      params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
      url_1:'outside'
    })
}

//获取编码
export function getSqsxBm(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.getSqsxBm,
      method:'get' ,
      params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
      url_1:'outside'
    })
  }

  export function spcyUpdateKbJobInBkb(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.spcyUpdateKbJobInBkb,
      method:'post' ,
      data:params,
      url_1:'outside'
    })
  }

  export function spcyGetJobConcernByJobId(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.spcyGetJobConcernByJobId,
      method:'get' ,
      params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
      url_1:'outside'
    })
  }

  export function sjxdgetJobConcernByJobId(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.sjxdgetJobConcernByJobId,
      method:'get' ,
      params:params,
      url_1:'outside'
    })
  }

  
  export function sjxdfqsjxdFlow(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.sjxdfqsjxdFlow,
      method:'post' ,
      data:params,
      url_1:'outside'
    })
  }

  
  export function sjxdquerySjxdRyList(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.sjxdquerySjxdRyList,
      method:'get' ,
      params:params,
      url_1:'outside'
    })
  }

  export function sjxdaddSjxdXpry(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.sjxdaddSjxdXpry,
      method:'post' ,
      data:params,
      url_1:'outside'
    })
  }
  export function sjxddeleteSjxdXpry(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.sjxddeleteSjxdXpry,
      method:'DELETE' ,
      params:params,
      url_1:'outside'
    })
  }
  export function sjxdupdateSjxdInfo(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.sjxdupdateSjxdInfo,
      method:'post' ,
      data:params,
      url_1:'outside'
    })
  }
  
  export function sjxddeleteSjxdInfo(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.sjxddeleteSjxdInfo,
      method:'DELETE' ,
      params:params,
      url_1:'outside'
    })
  }
  export function sjxdreturnFlowJob(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.sjxdreturnFlowJob,
      method:'post' ,
      data:params,
      url_1:'outside'
    })
  }

  export function sjxdquerySjxdFaWjList(params){
    fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
    return axios({
      url: assessCheckApi.sjxdquerySjxdFaWjList,
      method:'get' ,
      params:params,
      url_1:'outside'
    })
  }
  export function webOfficeApiopenFile(parameter) {
    return axios({
      url:assessCheckApi.webOfficeApiopenFile,
      method: 'get',
      params: parameter,
      url_1:'outside'
    })
  }
  

  export function openFileReadOnly(parameter) {
    return axios({
      url:assessCheckApi.openFileReadOnly,
      method: 'get',
      params: parameter,
      url_1:'outside'
    })
  }

  export function getDocxToPdf(parameter) {
    return axios({
      url:assessCheckApi.getDocxToPdf,
      method: 'get',
      params: parameter,
      url_1:'outside'
    })
  }

  export function againEditPdfOnlineFile(parameter) {
    return axios({
      url:assessCheckApi.againEditPdfOnlineFile,
      method: 'get',
      params: parameter,
      url_1:'outside'
    })
  }
  
  export function spcySqsxWjjlgetLocalFileById(params){
    return axios({
      url: assessCheckApi.spcySqsxWjjlgetLocalFileById,
      method:'get' ,
      params:params,
      url_1:'outside',
      responseType: 'arraybuffer'
    })
  }
  
  